package com.ruoyi.logistic.service.impl;

import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.logistic.domain.NetworkPostEffect;
import com.ruoyi.logistic.mapper.NetworkPostEffectMapper;
import com.ruoyi.logistic.service.NetworkPostEffectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class NetworkPostEffectServiceImpl implements NetworkPostEffectService {
    @Autowired
    private NetworkPostEffectMapper networkPostEffectMapper;
    @Override
    public List<NetworkPostEffect> selectAll() {
        return networkPostEffectMapper.selectAll();
    }

    @Override
    public Boolean insert(NetworkPostEffect networkPostEffect) {
        networkPostEffect.setCreateBy(SecurityUtils.getUserId());
        networkPostEffect.setUpdateBy(SecurityUtils.getUserId());
        return networkPostEffectMapper.insert(networkPostEffect);
    }

    @Override
    public Boolean update(NetworkPostEffect networkPostEffect) {
        networkPostEffect.setUpdateBy(SecurityUtils.getUserId());
        return networkPostEffectMapper.update(networkPostEffect);
    }

    @Override
    public Boolean deleteById(Integer id) {
        return networkPostEffectMapper.deleteById(id);
    }
}
